    <?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Template {
   private static $dot ='.';
   public static  function renderTemplate($name,$path,$extention = NULL){
        $extention != '' ? $extention = self::$dot.$extention : $extention = '.php';
        $templateName = $path.$name.$extention;
          if(file_exists($templateName)) {
            require_once ($templateName);
        } else {
           echo  new ErrorException($fiileName. "Is not exists.");
        }    
    }
    public static function setDisplay($name,$value){
        $GLOBALS[$name]=$value ;
    }
    public static function getDisplay($name){
        return $GLOBALS[$name] ;
    }
    
}

?>
